package com.sft360.kb.drawview;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.view.View;

public class OvalView extends View {
    public OvalView(Context context) {
        super(context);
    }

    public OvalView(Context context,AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        Paint p = new Paint();
        p.setColor(Color.BLACK);
        p.setAntiAlias(false);
        p.setStyle(Paint.Style.STROKE);
        RectF rectF = new RectF(60,100,200,240);
//        rectF.set(210,100,250,130);
        canvas.drawOval(rectF, p);
        canvas.drawRect(210,100,250,130,p);
        canvas.drawRect(60,100,200,240,p);
    }
}
